import request from '@/utils/request'

export function page(name,year,pro,page,pageSize) {
  return request({
    url: '/course?name='+name+'&year='+year+'&pro='+pro+'&page='+page+'&pageSize='+pageSize,
    method: 'get'
  })
}

export function deleteById(id) {
  return request({
    url: '/course/'+id,
    method: 'delete',
  })
}

export function add(course) {
  return request({
    url: '/course',
    method: 'post',
    data: course
  })
}

export function update(course) {
  return request({
    url: '/course',
    method: 'put',
    data: course
  })
}

export function selectById(id) {
  return request({
    url: '/course/'+id,
    method: 'get',
  })
}

export function findAllCourse() {
  return request({
    url: '/course/all',
    method: 'get'
  })
}